package com.looking;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/1/10.
 */
public class DemoPersist implements Persist {
    private List<String> who;
    private List<String> what;
    private List<String> where;

    DemoPersist() {
        initthis();
    }

    private void initthis() {
        who = new ArrayList<String>();
        who.add("Sid");
        who.add("Mary");
        who.add("LiLy");
        who.add("Jone");

        where = new ArrayList<String>();
        where.add("在河里");
        where.add("在树上");
        where.add("在床上");
        where.add("在田野里");
        where.add("在天上");
        where.add("在椅子上");
        where.add("在工地上");
        where.add("在车里");
        where.add("在房顶");

        what = new ArrayList<String>();
        what.add("游泳");
        what.add("捉鸟");
        what.add("跳舞");
        what.add("唱歌");
        what.add("玩泥巴");
        what.add("弹吉他");
        what.add("撒野");
        what.add("走路");
        what.add("玩手机");
        what.add("写代码");
    }


    @Override
    public List<String> getListByKey(String key) {
        switch (key) {
            case "who":
                return who;
            case "where":
                return where;
            case "what":
                return what;
            default:
                return new ArrayList<String>() {{
                    add("default");
                }};
        }
    }
}
